package org.tea.inventory.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.tea.inventory.dao.tea.SupplierContractMapper;
import org.tea.inventory.domain.tea.SupplierContract;
import org.tea.inventory.service.ISupplierContractService;

import java.util.List;

/**
 * 供应商合同Service业务层处理
 * 
 * @author dongxb
 * @date 2025-04-14
 */
@Service
public class SupplierContractServiceImpl implements ISupplierContractService
{
    @Autowired
    private SupplierContractMapper supplierContractMapper;

    /**
     * 查询供应商合同
     * 
     * @param id 供应商合同主键
     * @return 供应商合同
     */
    @Override
    public SupplierContract selectSupplierContractById(Long id)
    {
        return supplierContractMapper.selectSupplierContractById(id);
    }

    /**
     * 查询供应商合同列表
     * 
     * @param supplierContract 供应商合同
     * @return 供应商合同
     */
    @Override
    public List<SupplierContract> selectSupplierContractList(SupplierContract supplierContract)
    {
        return supplierContractMapper.selectSupplierContractList(supplierContract);
    }

    /**
     * 新增供应商合同
     * 
     * @param supplierContract 供应商合同
     * @return 结果
     */
    @Override
    public int insertSupplierContract(SupplierContract supplierContract)
    {
        return supplierContractMapper.insertSupplierContract(supplierContract);
    }

    /**
     * 修改供应商合同
     * 
     * @param supplierContract 供应商合同
     * @return 结果
     */
    @Override
    public int updateSupplierContract(SupplierContract supplierContract)
    {
        return supplierContractMapper.updateSupplierContract(supplierContract);
    }

    /**
     * 批量删除供应商合同
     * 
     * @param ids 需要删除的供应商合同主键
     * @return 结果
     */
    @Override
    public int deleteSupplierContractByIds(Long[] ids)
    {
        return supplierContractMapper.deleteSupplierContractByIds(ids);
    }

    /**
     * 删除供应商合同信息
     * 
     * @param id 供应商合同主键
     * @return 结果
     */
    @Override
    public int deleteSupplierContractById(Long id)
    {
        return supplierContractMapper.deleteSupplierContractById(id);
    }
}
